package com.atguigu.gulimall.gulimallproduct.vo;

import com.atguigu.gulimall.gulimallproduct.entity.SkuImagesEntity;
import com.atguigu.gulimall.gulimallproduct.entity.SkuInfoEntity;
import com.atguigu.gulimall.gulimallproduct.entity.SpuInfoDescEntity;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * @Author: Zjn ; Bring it on !!!
 * @Date: 2021/11/14 0014 19:55
 * Note:
 */
@ToString
@Data
public class SkuItemVo {

    //1、sku基本信息的获取  pms_sku_info
    private SkuInfoEntity info;

    private boolean hasStock = true;

    //2、sku的图片信息    pms_sku_images
    private List<SkuImagesEntity> images;

    //3、获取spu的销售属性组合
    private List<SkuItemSaleAttrsVo> saleAttr;

    //4、获取spu的介绍
    private SpuInfoDescEntity desc;

    //5、获取spu的规格参数信息
    private List<SpuItemAttrGroupVo> groupAttrs;

    //6、秒杀商品的优惠信息
    private SeckillSkuVo seckillSkuVo;

    @Data
    public static class SkuItemSaleAttrsVo{
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    @Data
    public static class SpuItemAttrGroupVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }


    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValues;
    }

    @Data
    public static class AttrValueWithSkuIdVo{
        private String attrValue;
        private String skuIds;
    }
}
